package com.lc.exception;

import com.lc.result.ResultEnum;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException{

    private ResultEnum code;

    public BusinessException(ResultEnum code) {
        this.code = code;
    }

    public BusinessException(String msg) {
        super(msg);
    }

    public BusinessException(ResultEnum code, Throwable cause) {
        super(cause);
        this.code = code;
    }

    public ResultEnum getCode() {
        return code;
    }

    public void setCode(ResultEnum code) {
        this.code = code;
    }

}